package com.store.common;

import java.io.Closeable;

/**
 * @author mmzhang
 * @date 2021年08月18日 20:03
 * @Description:
 */
public abstract class IOUtils {

    /**
     * 关闭资源
     * @param closeable
     */
    public static void closeQuietly(Closeable closeable){
        if(null != closeable){
            try {
               closeable.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    public static void closeQuietly(AutoCloseable autoCloseable){
        if(null != autoCloseable){
            try {
                autoCloseable.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }





}
